package com.bee.baselibrary.refresh;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.scwang.smartrefresh.layout.api.RefreshHeader;
import com.scwang.smartrefresh.layout.api.RefreshKernel;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.constant.RefreshState;
import com.scwang.smartrefresh.layout.constant.SpinnerStyle;

import androidx.annotation.NonNull;

/**
 * @author LiHao 南柯一梦宁沉沦 不梦前程不梦卿
 * @org www.fengjishi.com (重庆蜂效电子商务有限公司)
 * @data Created time 2019/3/4.
 * @email 930176087@qq.com
 * @pakeage com.bee.baselibrary.refresh
 * Personal signature 余生还长 何必慌张
 * Page description : TODO
 */
public class MyRefreshHeader extends RelativeLayout implements RefreshHeader {
    public MyRefreshHeader(Context context) {
        super(context);
        this.initView(context, null, 0);
    }

    public MyRefreshHeader(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.initView(context, attrs, 0);
    }

    public MyRefreshHeader(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.initView(context, attrs, defStyleAttr);
    }
    private void initView(Context context, AttributeSet attrs, int defStyleAttr) {
//        setMinimumHeight(dp2px(context, 80));
//        LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
//        params.addRule(CENTER_IN_PARENT);
//        View headerView = View.inflate(context, R.layout.my_refresh_header, null);
//        mCircleProgressView = (CircleProgressView) headerView.findViewById(R.id.circleProgressView);
//        mTextView = (TextView) headerView.findViewById(R.id.textview);
//        mArrow = (ImageView) headerView.findViewById(R.id.iv_refresh_center);
//        addView(headerView, params);
    }

    @NonNull
    @Override
    public View getView() {
        return null;
    }

    @NonNull
    @Override
    public SpinnerStyle getSpinnerStyle() {
        return null;
    }

    @Override
    public void setPrimaryColors(int... colors) {

    }

    @Override
    public void onInitialized(@NonNull RefreshKernel kernel, int height, int maxDragHeight) {

    }

    @Override
    public void onMoving(boolean isDragging, float percent, int offset, int height, int maxDragHeight) {

    }

    @Override
    public void onReleased(@NonNull RefreshLayout refreshLayout, int height, int maxDragHeight) {

    }

    @Override
    public void onStartAnimator(@NonNull RefreshLayout refreshLayout, int height, int maxDragHeight) {

    }

    @Override
    public int onFinish(@NonNull RefreshLayout refreshLayout, boolean success) {
        return 0;
    }

    @Override
    public void onHorizontalDrag(float percentX, int offsetX, int offsetMax) {

    }

    @Override
    public boolean isSupportHorizontalDrag() {
        return false;
    }

    @Override
    public void onStateChanged(@NonNull RefreshLayout refreshLayout, @NonNull RefreshState oldState, @NonNull RefreshState newState) {

    }
}
